package com.sky.common.node.sort;

import com.sky.business.sys.domain.Node;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.jetbrains.annotations.NotNull;

/**
 * 节点得分
 */
@Data
@AllArgsConstructor
public  class NodeScore implements Comparable<NodeScore> {
    private Node node;
    private Double score;

    @Override
    public int compareTo(@NotNull NodeScore o) {
        return -score.compareTo(o.getScore());
    }
}
